<template>
    <example :template-code="templateString">
        <template #describe>
            <t :id="`${$t('设定值区间及精度')}`">{{ $t('设定值区间及精度') }}</t>
        </template>
        <div style="width: 300px;color:#666;">
            <p>v-model 绑定值：{{ value }}</p>
            <sib-item v-model="value" :props="props"></sib-item>
        </div>
    </example>
</template>

<script>
import { ref, reactive } from 'vue';

export default {
    setup() {
        const value = ref(null);
        const props = reactive({
            type: 'number',
            min: 5,
            max: 10,
            precision: 1,
        });

        return {
            props,
            value,
            templateString: `<template>
    <p>v-model 绑定值：{{ value }}</p>
    <sib-item v-model="value" :props="props"></sib-item>
</template>

<script>
import { ref, reactive } from 'vue';

export default {
    setup() {
        const value = ref(null);
        const props = reactive({
            type: 'number',
            min: 5,
            max: 10,
            precision: 1,
        });

        return { props, value };
    },
};
<\/script>`,
        };
    },
};
</script>
